package com.client.job.core.model;






import com.client.job.utils.MJobUtils;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * 任务实例
 * 
 * @author mxz
 *
 */
@Getter
@Setter
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class MJobInstance {

	/**
	 * Id
	 */
	private String machineId;

	/**
	 * ip
	 */
	private String machineIp;

	/**
	 * 端口
	 */
	private String port;
	
	/**
	 * 应用访问路径
	 */
	private String basePath;

	/**
	 * 应用名称
	 */
	private String appName;

	/**
	 * 机器时间
	 */
	private Long machineTime;

	/**
	 * 任务ID
	 */
	private String jobId;

	/**
	 * 任务名称
	 */
	private String jobName;

	/**
	 * 任务状态
	 */
	private Integer jobStatus;

	/**
	 * 排序
	 */
	private Integer sort;
	
	/**
	 * 服务状态
	 */
	private Integer serverStatus;
	
	
	

	public String getServerInfo() {
		return MJobUtils.genServerFlag(this.getAppName(), this.getPort());
	}
	
	
		
		
		
	

}
